//    Copyright (C) Kherty.  All rights reserved.
using System;

namespace OpenLS.Spreadsheet.Extensibility
{
    public class NoConversionAttribute: ParameterConverterAttribute
    {
        internal override void ConvertImp(ConversionData data)
        {
            data.Result = data.Value;
        }
        public override int Priority
        {
            get
            {
                return 100000000;
            }
        }
    }
    public class NoCellAccessAttribute : Attribute, IParameterConverter, IParameterConverterProvider
    {

        #region IArgumentConverterProvider Members

        public IParameterConverter GetConverter()
        {
            return this;
        }

        #endregion

        #region IArgumentConverter Members

        public void Convert(ConversionData data)
        {
            if (data.Value is ICell)
            {
                data.Result = data.Value;
                //data.Successful = true;
                return;
            }
           // data.Result = null;
           // data.Successful = false;
        }

        public int Priority
        {
            get { return 0; }
        }

        #endregion
    }
}